.class public Lcom/TwinBlade/PicturePassword/PayPalKey;
.super Landroid/app/Activity;
.source "SourceFile"


# instance fields
.field public a:Landroid/widget/EditText;

.field private final b:I

.field private final c:I

.field private d:Landroid/widget/Button;

.field private e:Lcom/paypal/android/MEP/a;

.field private f:Landroid/app/Dialog;

.field private g:Landroid/content/Context;


# direct methods
.method public constructor <init>()V
    .locals 1

    .prologue
    .line 33
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 35
    const/4 v0, 0x1

    iput v0, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->b:I

    .line 36
    const/4 v0, 0x2

    iput v0, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->c:I

    .line 33
    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/PayPalKey;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 42
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->g:Landroid/content/Context;

    return-object v0
.end method

.method private a()V
    .locals 5

    .prologue
    .line 53
    invoke-static {p0}, Landroid/accounts/AccountManager;->get(Landroid/content/Context;)Landroid/accounts/AccountManager;

    move-result-object v0

    .line 54
    const-string v1, "com.google"

    invoke-virtual {v0, v1}, Landroid/accounts/AccountManager;->getAccountsByType(Ljava/lang/String;)[Landroid/accounts/Account;

    move-result-object v1

    .line 55
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 56
    array-length v3, v1

    const/4 v0, 0x0

    :goto_0
    if-lt v0, v3, :cond_0

    .line 60
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v0

    new-array v0, v0, [Ljava/lang/CharSequence;

    invoke-interface {v2, v0}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [Ljava/lang/CharSequence;

    .line 62
    new-instance v1, Landroid/app/AlertDialog$Builder;

    invoke-direct {v1, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 63
    const v3, 0x7f0900a3

    invoke-virtual {p0, v3}, Lcom/TwinBlade/PicturePassword/PayPalKey;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v3}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 64
    new-instance v3, Lcom/TwinBlade/PicturePassword/az;

    invoke-direct {v3, p0, v2}, Lcom/TwinBlade/PicturePassword/az;-><init>(Lcom/TwinBlade/PicturePassword/PayPalKey;Ljava/util/List;)V

    invoke-virtual {v1, v0, v3}, Landroid/app/AlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    move-result-object v0

    .line 70
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    .line 71
    return-void

    .line 56
    :cond_0
    aget-object v4, v1, v0

    .line 57
    iget-object v4, v4, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 56
    add-int/lit8 v0, v0, 0x1

    goto :goto_0
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/PayPalKey;Landroid/app/Dialog;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 41
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->f:Landroid/app/Dialog;

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/PayPalKey;Landroid/widget/Button;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 38
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->d:Landroid/widget/Button;

    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/PayPalKey;Lcom/paypal/android/MEP/a;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 39
    iput-object p1, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->e:Lcom/paypal/android/MEP/a;

    return-void
.end method

.method private a(Ljava/lang/String;)V
    .locals 3
    .parameter

    .prologue
    .line 74
    new-instance v0, Lcom/paypal/android/MEP/k;

    invoke-direct {v0}, Lcom/paypal/android/MEP/k;-><init>()V

    .line 75
    new-instance v1, Ljava/math/BigDecimal;

    const-string v2, "1.99"

    invoke-direct {v1, v2}, Ljava/math/BigDecimal;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/paypal/android/MEP/k;->a(Ljava/math/BigDecimal;)V

    .line 76
    const-string v1, "USD"

    invoke-virtual {v0, v1}, Lcom/paypal/android/MEP/k;->a(Ljava/lang/String;)V

    .line 77
    const-string v1, "twinbladecorp@paypal.com"

    invoke-virtual {v0, v1}, Lcom/paypal/android/MEP/k;->b(Ljava/lang/String;)V

    .line 78
    const-string v1, "TwinBlade"

    invoke-virtual {v0, v1}, Lcom/paypal/android/MEP/k;->c(Ljava/lang/String;)V

    .line 79
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/paypal/android/MEP/k;->a(I)V

    .line 80
    invoke-static {}, Lcom/paypal/android/MEP/e;->a()Lcom/paypal/android/MEP/e;

    move-result-object v1

    new-instance v2, Lcom/TwinBlade/PicturePassword/aw;

    invoke-direct {v2, p0, p1}, Lcom/TwinBlade/PicturePassword/aw;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    invoke-virtual {v1, v0, p0, v2}, Lcom/paypal/android/MEP/e;->a(Lcom/paypal/android/MEP/k;Landroid/content/Context;Lcom/paypal/android/MEP/n;)Landroid/content/Intent;

    move-result-object v0

    .line 81
    const/4 v1, 0x1

    invoke-virtual {p0, v0, v1}, Lcom/TwinBlade/PicturePassword/PayPalKey;->startActivityForResult(Landroid/content/Intent;I)V

    .line 82
    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/PayPalKey;Ljava/lang/String;)Z
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 84
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/PayPalKey;->b(Ljava/lang/String;)Z

    move-result v0

    return v0
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/PayPalKey;)Landroid/app/Dialog;
    .locals 1
    .parameter

    .prologue
    .line 41
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->f:Landroid/app/Dialog;

    return-object v0
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/PayPalKey;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 73
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/PayPalKey;->a(Ljava/lang/String;)V

    return-void
.end method

.method private b(Ljava/lang/String;)Z
    .locals 6
    .parameter

    .prologue
    const/4 v0, 0x0

    .line 85
    invoke-static {p0}, Landroid/accounts/AccountManager;->get(Landroid/content/Context;)Landroid/accounts/AccountManager;

    move-result-object v1

    .line 86
    const-string v2, "com.google"

    invoke-virtual {v1, v2}, Landroid/accounts/AccountManager;->getAccountsByType(Ljava/lang/String;)[Landroid/accounts/Account;

    move-result-object v2

    .line 88
    new-instance v1, Lcom/TwinBlade/PicturePassword/be;

    invoke-direct {v1}, Lcom/TwinBlade/PicturePassword/be;-><init>()V

    .line 89
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Lcom/TwinBlade/PicturePassword/be;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v3, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "@gmail.com"

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 92
    array-length v4, v2

    move v1, v0

    :goto_0
    if-lt v1, v4, :cond_0

    .line 98
    return v0

    .line 92
    :cond_0
    aget-object v5, v2, v1

    .line 93
    iget-object v5, v5, Landroid/accounts/Account;->name:Ljava/lang/String;

    invoke-virtual {v5, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_1

    .line 94
    const/4 v0, 0x1

    .line 92
    :cond_1
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method

.method static synthetic c(Lcom/TwinBlade/PicturePassword/PayPalKey;)Lcom/paypal/android/MEP/a;
    .locals 1
    .parameter

    .prologue
    .line 39
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->e:Lcom/paypal/android/MEP/a;

    return-object v0
.end method

.method static synthetic d(Lcom/TwinBlade/PicturePassword/PayPalKey;)V
    .locals 0
    .parameter

    .prologue
    .line 52
    invoke-direct {p0}, Lcom/TwinBlade/PicturePassword/PayPalKey;->a()V

    return-void
.end method

.method static synthetic e(Lcom/TwinBlade/PicturePassword/PayPalKey;)Landroid/widget/Button;
    .locals 1
    .parameter

    .prologue
    .line 38
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->d:Landroid/widget/Button;

    return-object v0
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .locals 2
    .parameter

    .prologue
    .line 46
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 47
    iput-object p0, p0, Lcom/TwinBlade/PicturePassword/PayPalKey;->g:Landroid/content/Context;

    .line 49
    new-instance v0, Lcom/TwinBlade/PicturePassword/ba;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/TwinBlade/PicturePassword/ba;-><init>(Lcom/TwinBlade/PicturePassword/PayPalKey;Lcom/TwinBlade/PicturePassword/ba;)V

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/TwinBlade/PicturePassword/ba;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 50
    return-void
.end method
